package com.hulk.ratel.web.control;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;

/**
 * @author cmt
 * @version Create on: 2017年7月19日 下午3:52:32 Class description
 * @E-mail:29572320@qq.com
 */

@RestController
@RequestMapping(value = "/rest")
@Slf4j
public class HeartBeatCtl {


    @RequestMapping(value = "/heartbeat")
    @ResponseBody
    public String excute(HttpServletRequest request) {
        Enumeration<String> names = request.getParameterNames();
        while (names.hasMoreElements()){
            String name = names.nextElement();
            log.info("########## {} : {}",name,request.getParameter(name));
        }
        log.debug("receive hearbeat . .. . .. . ..");
        return "000000";
    }

}
